🌻 Collapsing factor labels and excluding brackets#

22 Sep 2025

This extension is about using factor labels to unify many “different-looking” factors into one.

Like the other transform filters, this is a temporary rewrite used for analysis and presentation; it doesn’t change your underlying coding.

In the current app, these text matches are case-insensitive (case doesn’t matter).

Untitled

Untitled

All the corresponding factors are collapsed into one factor which is now labelled with the search term.

Multiple search terms, combining results#

You can put more than one search term, like this:

Untitled

Untitled

Multiple search terms with separate results#

Or if you want to keep the results separate:

Untitled

Untitled

The factors which match the filter are shown with a thicker purple border.

Multiple search terms with OR and separate results#

The previous strategy won’t work if you want to search for Food OR Diet on the one hand and Income OR money on the other, and to keep these two separate. So you can literally use OR instead. Make sure to put a space on each side.

Untitled

As these searches are case-sensitive, this trick can be useful to capture both Health and health.

Untitled

Excluding brackets (same idea, fixed rule)#

If you often code specific labels like Education (primary school) and Education (secondary school), excluding bracket text is just a convenient way to collapse them both to Education without having to maintain a list of search terms.